package com.beetobe.main;

import android.app.Activity;
import android.content.Intent;
import android.content.pm.PackageManager.NameNotFoundException;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.Window;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

public class MakeBee extends Activity {

	String year;
	String month;
	String day;
	EditText et_time, et_place, et_price;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);

		setContentView(R.layout.activity_make_bee);

		Intent intent = getIntent();
		year = intent.getStringExtra("YEAR");
		month = intent.getStringExtra("MONTH");
		day = intent.getStringExtra("DAY");

		TextView tv_title = (TextView) findViewById(R.id.TV_TITLE);
		tv_title.setText(year + "/" + month + "/" + day + " 의 약속");
		et_time = (EditText) findViewById(R.id.ET_TIME);
		et_place = (EditText) findViewById(R.id.ET_PLACE);
		et_price = (EditText) findViewById(R.id.ET_PRICE);

		Button btn_makebee = (Button) findViewById(R.id.BTN_MAKEBEE);
		btn_makebee.setOnClickListener(new OnClickListener() {

			public void onClick(View v) {
				// TODO Auto-generated method stub
				// īī�� ��ũ
				String body = year + "년 " + month + "월 " + day
						+ "일의 모임을 공지합니다.\n" + et_time.getText().toString()
						+ "시에" + et_place.getText().toString()
						+ "에서 모이도록 하겠습니다.\n회비는 "
						+ et_price.getText().toString() + "입니다.:D";

				KakaoLink kakaoLink = KakaoLink.getLink(getApplicationContext());
				
						kakaoLink.sendMsg(
								MakeBee.this, "BeeToBe - 모임 공지", body);
					
				

			}
		});

	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// getMenuInflater().inflate(R.menu.activity_make_bee, menu);
		return true;
	}
}
